//package com.zhengqing.common.core.config;
//
//import io.undertow.server.DefaultByteBufferPool;
//import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
//import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
//import org.springframework.boot.web.server.WebServerFactoryCustomizer;
//import org.springframework.stereotype.Component;
//
///**
// * <p>
// * undertow自定义配置
// * </p>
// *
// * @author zhengqingya
// * @description 解决启动警告：`UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used`
// * @date 2020/5/20 15:45
// */
//@Component
//public class UndertowConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
//
//    @Override
//    public void customize(UndertowServletWebServerFactory factory) {
//        factory.addDeploymentInfoCustomizers(deploymentInfo -> {
//            WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
//            webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 1024));
//            deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo",
//                    webSocketDeploymentInfo);
//        });
//    }
//
//}
